package com.funtl.itoken.web.admin.service;

import com.funtl.itoken.web.admin.service.fallback.RedisServiceFallbackImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "itoken-service-redis", fallback = RedisServiceFallbackImpl.class)
public interface RedisService {


    @GetMapping("get")
    String get(@RequestParam(value = "key") String key);


    @PostMapping("put")
    String put(@RequestParam(value = "key") String key,
               @RequestParam(value = "value") String value,
               @RequestParam(value = "seconds") long seconds);

}
